package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchWaterQualityIndicatorsMapper;
import com.ruoyi.system.domain.DispatchWaterQualityIndicators;
import com.ruoyi.system.service.IDispatchWaterQualityIndicatorsService;

/**
 * 水质指标Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchWaterQualityIndicatorsServiceImpl implements IDispatchWaterQualityIndicatorsService 
{
    @Autowired
    private DispatchWaterQualityIndicatorsMapper dispatchWaterQualityIndicatorsMapper;

    /**
     * 查询水质指标
     * 
     * @param waterQualityIndicatorsId 水质指标主键
     * @return 水质指标
     */
    @Override
    public DispatchWaterQualityIndicators selectDispatchWaterQualityIndicatorsByWaterQualityIndicatorsId(Long waterQualityIndicatorsId)
    {
        return dispatchWaterQualityIndicatorsMapper.selectDispatchWaterQualityIndicatorsByWaterQualityIndicatorsId(waterQualityIndicatorsId);
    }

    /**
     * 查询水质指标列表
     * 
     * @param dispatchWaterQualityIndicators 水质指标
     * @return 水质指标
     */
    @Override
    public List<DispatchWaterQualityIndicators> selectDispatchWaterQualityIndicatorsList(DispatchWaterQualityIndicators dispatchWaterQualityIndicators)
    {
        return dispatchWaterQualityIndicatorsMapper.selectDispatchWaterQualityIndicatorsList(dispatchWaterQualityIndicators);
    }

    /**
     * 新增水质指标
     * 
     * @param dispatchWaterQualityIndicators 水质指标
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchWaterQualityIndicators(DispatchWaterQualityIndicators dispatchWaterQualityIndicators)
    {
        return dispatchWaterQualityIndicatorsMapper.insertDispatchWaterQualityIndicators(dispatchWaterQualityIndicators);
    }

    /**
     * 修改水质指标
     * 
     * @param dispatchWaterQualityIndicators 水质指标
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchWaterQualityIndicators(DispatchWaterQualityIndicators dispatchWaterQualityIndicators)
    {
        return dispatchWaterQualityIndicatorsMapper.updateDispatchWaterQualityIndicators(dispatchWaterQualityIndicators);
    }

    /**
     * 批量删除水质指标
     * 
     * @param waterQualityIndicatorsIds 需要删除的水质指标主键
     * @return 结果
     */
    @Override
    public int deleteDispatchWaterQualityIndicatorsByWaterQualityIndicatorsIds(Long[] waterQualityIndicatorsIds)
    {
        return dispatchWaterQualityIndicatorsMapper.deleteDispatchWaterQualityIndicatorsByWaterQualityIndicatorsIds(waterQualityIndicatorsIds);
    }

    /**
     * 删除水质指标信息
     * 
     * @param waterQualityIndicatorsId 水质指标主键
     * @return 结果
     */
    @Override
    public int deleteDispatchWaterQualityIndicatorsByWaterQualityIndicatorsId(Long waterQualityIndicatorsId)
    {
        return dispatchWaterQualityIndicatorsMapper.deleteDispatchWaterQualityIndicatorsByWaterQualityIndicatorsId(waterQualityIndicatorsId);
    }
}
